﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace RB.Web.Security
{
    /// <summary>
    /// 应用程序菜单类
    /// </summary>
    [RB.DataAccess.Attributes.QueryName("AppMenu")]
    [RB.DataAccess.Attributes.TableName("AppMenu")]
    public class AppMenu : RB.Domain.Models.ITransaction
    {
        [RB.DataAccess.Attributes.AutoIncrementAttribute]
        public int Id { get; set; }

        /// <summary>
        /// 父菜单Id
        /// 为0时表示第一层
        /// </summary>
        public int ParentId { get; set; }

        [System.ComponentModel.DataAnnotations.StringLengthAttribute(20)]
        public string AppCode { get; set; }

        [System.ComponentModel.DataAnnotations.StringLengthAttribute(100)]
        public string Name1 { get; set; }

        [System.ComponentModel.DataAnnotations.StringLengthAttribute(50)]
        public string CreateBy { get; set; }

        public DateTime? CreateTime { get; set; }

        [System.ComponentModel.DataAnnotations.StringLengthAttribute(50)]
        public string ModifyBy { get; set; }

        public DateTime? ModifyTime { get; set; }

        public bool IsDisabled { get; set; }

        public short? Sequence { get; set; }

        [System.ComponentModel.DataAnnotations.StringLengthAttribute(20)]
        public string PermCode { get; set; }

        /// <summary>
        /// Url of a menu item
        /// if there is %...% in it, it must be replaced by the value in appSettings
        /// </summary>
        [StringLength(255)]
        public string Url { get; set; }

    }


}
